[ Home |
Download |
Order |
Support
]
[ Table of Contents ]
The HTML Validator Command Line Processor can be run from a DOS command prompt and will accept arguments passed to it from the command line.
NOTE: Since processing more than one file at a time using command line arguments is inefficient (unless you use the -f command), it is recommended that you use the drag and drop capability or the Batch Wizard to process multiple files. That is, drop the files to process onto the Drag and Drop Window of a running instance of HTML Validator. Use Explorer to select the files to drop, and make sure that HTML Validator is set up to process the dropped files the way that you want (by validating and/or using a tool).
The file to run when using command line arguments is called "cmdlineprocessor.exe". This executable understands command line arguments and will call the validator engine (now in a DLL) to perform the correct job.
Examples of acceptable command lines include:
- "cmdlineprocessor.exe -l filename" - This causes HTML Validator to use the Lowercase Tool on the file specified by filename. Note that -l is the letter L and not the number one.
- "cmdlineprocessor.exe -u filename" - This causes HTML Validator to use the Uppercase Tool on the file specified by filename.
- "cmdlineprocessor.exe -s filename" - This causes HTML Validator to use the Strip HTML Tool on the file specified by filename.
- "cmdlineprocessor.exe -t filename" - This causes HTML Validator to use the Template Tool on the file specified by filename.
- "cmdlineprocessor.exe -c filename" - This causes HTML Validator to use the Convert Text File Format Tool on the file specified by filename. The format converted to is specified by the last saved program options.
- "cmdlineprocessor.exe -f filename" - This causes one instance of HTML Validator to efficiently execute multiple command lines. Each command line to execute is on a single line in the file specified by filename. The name of the executable cannot be used and is unnecessary in filename. Using this method instead of calling the validator's executable many times is much faster. (New v3.00)
Example filename to use the Template Tool:
-t c:\htmlfiles\document1.html
-t c:\htmlfiles\document2.html
-t c:\htmlfiles\document3.html
-t c:\htmlfiles\document4.html
"cmdlineprocessor.exe -n windowname,messagenum,messageint" - This causes HTML Validator to send the message WM_USER+messagenum to the window named windowname. LPARAM will be messageint. (New v3.00)
- "cmdlineprocessor.exe filename" - This causes HTML Validator to validate the file specified by filename. HTML Validator may ask you if you want to open the viewer application with the results or may automatically open the viewer, depending on the program options.
- "cmdlineprocessor.exe -v filename" - This causes HTML Validator to validate the file specified by filename. -v forces the validator to open the results with the viewer, regardless of the program options. (New v3.00)
- "cmdlineprocessor.exe -b filename" - This causes the Batch Wizard to validate the targets in the target list specified by filename. The Batch Wizard does not automatically exit after processing. If HTML Validator is already running when this command is issued, the already running instance will be used to validate the target list and a new instance will not be created. (New v4.0330)
- "cmdlineprocessor.exe -o filename" - This causes HTML Validator to open the file specified by filename in the integrated editor. Multiple filenames separated by spaces are allowed. Filenames may be enclosed by quotation marks and should be if the filename contains space characters.(New v5.50)
- "cmdlineprocessor.exe -1" - This causes the Validator Engine Options to be displayed. HTML Validator does not continue running when the Validator Engine Options are closed.
- "cmdlineprocessor.exe -2" - This causes the Configuration Editor to be displayed. HTML Validator does not continue running when the Configuration Editor is closed.
- "cmdlineprocessor.exe -3" - This causes the Batch Wizard Options to be displayed. HTML Validator will remain running when the Batch Wizard Options are closed. (New v4.04)
- "cmdlineprocessor.exe -4" - This causes the Editor Options to be displayed. HTML Validator will remain running when the Editor Options are closed. (New v4.04)
NOTE: The program options and configuration used to validate a document using a command line are those that are last saved and not necessarily those that are currently active if an instance of HTML Validator is running. This includes validating a document using an HTML Editor that provides integrated support for HTML Validator. If you've made changes to the options or configuration, then make sure that these changes have been saved before calling the validator on a command line.
Exit Codes
When cmdlineprocessor.exe exits, it returns one of the following values:
- 0 - no errors occurred in the cmdlineprocessor.exe portion of the command; however, it is possible an error occurred later
- 1 - a filename was given on the command line but the file does not exist
- 2 - miscellaneous error
- 3 - a filename is required for the command but none was given
- 4 - a timeout occurred waiting for HTML Validator's message window to become available; message could not be sent
- NOTE: Versions prior to v4.0330 will always return 0.
Special Notes
- If you are executing HTML Validator from a DOS prompt, you must include the path to cmdlineprocessor.exe if the directory that contains cmdlineprocessor.exe is not in the search path, otherwise the system will not be able to find HTML Validator. However, you can type the command in the Start | Run dialog box without a path to the executable (in this case, use htmlval.exe instead of cmdlineprocessor.exe; the system will automatically translate htmlval.exe to the correct executable).
- When HTML Validator is run with command line arguments, HTML Validator performs the operation specified by the command line arguments and then immediately exits (unless otherwise noted above for the specific argument).
- Be sure to include the full path to filename if it is not in the current directory.
- Letters following '-' are not case sensitive. They may be either uppercase or lowercase such as -l or -L.
Opening Files in the Editor
To open a file in the editor, you can call cse60.exe followed by the filename. For example, "cse60.exe filename".
Special Notes
- If you are executing HTML Validator's editor from a DOS prompt, you must include the path to cse60.exe if the directory that contains cse60.exe is not in the search path, otherwise the system will not be able to find the editor. However, you can type the command in the Start | Run dialog box without a path to the executable.
- Be sure to include the full path to filename if it is not in the current directory.
[ Table of Contents ]
Copyright © 1997-2003 AI Internet Solutions.